/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package se.kth.lwr.jeat.core;

import java.util.Collections;
import java.util.HashSet;
import java.util.Set;

/** PowerCategores defines different kinds of power used during
 * any phase of the life cyle, e.g. Electrical, fossil, etc. PowerCategories 
 * also holds a reference to all existing PowerCategories, which can be 
 * acquired by the method <code>getCategories()</code>. There is a standard set 
 * of PowerCategories that are statically available from this class. However 
 * it is easy to expand the set of standard Categories. See EmissionCategory for
 * further details.
 * 
 * @see EmissionCategory 
 * 
 * 
 * @author david
 */
public abstract class EnergyCategory extends Category<EnergyCategory>{
    
    private static Set<EnergyCategory> categories=new HashSet<>();
    

    public EnergyCategory(String name, String description) {
        super(name, description);
        categories.add(this);
    }
    

    @Override
    public Set<EnergyCategory> getCategories() {
        return Collections.unmodifiableSet(categories);
    }
    
    //Standard categories goes here
    
    /**
     * General electrical power without knowledege of origin 
     */
    public static final EnergyCategory ELECTRICAL= new EnergyCategory("ELECTRICAL", "General electrical power without knowledege of origin "){};
    
    /**
     * Power derived from cole combustion
     */
    public static final EnergyCategory COAL= new EnergyCategory("COAL", "Power derived from cole combustion"){};
    
    /**
     * Power derived from water power
     */
    public static final EnergyCategory WATER = new EnergyCategory("WATER", "Energy derived from water power"){};
    
    /**
     * Power derived from nuclear power plants
     */
    public static final EnergyCategory NUCLEAR= new EnergyCategory("NUCLEAR", "Power derived from nuclear power plants"){};
    
    /**
     * General fossil power derived from oil or coal combustion
     */
    public static final EnergyCategory FOSSIL= new EnergyCategory("FOSSIL", "General fossil power derived from oil or coal"){};
    
    /**
     * Power derived from combustion of fossil oil
     */
    public static final EnergyCategory OIL= new EnergyCategory("OIL", "Power derived from combustion of fossil oil"){};
    
    /**
     * Power as Heat
     */
    
    public static final EnergyCategory HEAT=new EnergyCategory("HEAT", "Power as heat") {};
    
}
